/*
 * Copyright (c) 2006-2021, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2023-03-01     86188       the first version
 */
#ifndef APPLICATIONS_HEADER_FILE_EKF_H_
#define APPLICATIONS_HEADER_FILE_EKF_H_
#include <imu.h>

typedef struct
{
    Axis3f Position;
    Axis3f Speed;
    Axis3f Acce;

    Axis3f Acce_Bias;
    float  Q[4];     //过程噪声方差
    float  R[2];     //观测噪声方差
    float  Pre_cov[4];
}EKF_HandleTypedef;

void  EKF_init(EKF_HandleTypedef *ekf, float R, float *Cov, float *Q);
void  EKF_Update(EKF_HandleTypedef *ekf,    //惯性导航结构体
                 float Observation,         //位置观测量
                 float acce,                //系统原始驱动量,惯导加速度
                 float dt,                  //系统积分步长
                 uint8_t Axis);             //坐标系

#endif /* APPLICATIONS_HEADER_FILE_EKF_H_ */
